#include <type_traits>

#include <log.h>

class Object {
public:
    double operator()() { return 0; }
    char operator()(int) { return 0; }
    int operator()(int, int) { return 0; }
};

int main()
{
    OUTER_LOGGER() << "invoke_result能够获取函数对象调用的返回值类型";
    CODE_LOGGER(std::invoke_result<Object>::type o1;);
    CODE_LOGGER(std::invoke_result<Object, int>::type o2;);
    CODE_LOGGER(std::invoke_result<Object, int, int>::type o3;);
    CODE_LOGGER(INNER_LOGGER() << typeid(o1).name());
    CODE_LOGGER(INNER_LOGGER() << typeid(o2).name());
    CODE_LOGGER(INNER_LOGGER() << typeid(o3).name());
    return 0;
}
